import {createApp} from 'vue'
import ElementPlus from 'element-plus'
// rem单位自适应
// import './rem.js'
// import "amfe-flexible/index.js";
import "@/assets/iconfont/icon-control";
import "jsoneditor";
// import 'amfe-flexible';
import ('@/assets/iconfont/iconfont.css')
import('@/assets/css/font/font.css')
import locale from 'element-plus/dist/locale/zh-cn.mjs'
// import 'element-plus/dist/index.css'
import '@/assets/styles/element.scss'
import '@/assets/styles/common.css'
import '@/assets/styles/manage.css'
import * as Elicons from "@element-plus/icons-vue";
import {setupStore} from '@/stores'
import App from './App.vue'
import router from './router'
import * as echarts from 'echarts'

const app = createApp(App)
// app.use(Pinia.createPinia())
app.use(router)
app.use(ElementPlus, {locale})
app.config.globalProperties.$echarts = echarts
setupStore(app)
for (const name in Elicons) {
  app.component(name, Elicons[name]);
}
app.mount('#app')

// var winWidth = window.innerWidth;
// var winHeight = window.innerHeight;
// // alert(winWidth+"    "+winHeight)
// //获得屏幕的宽度   rem=屏幕宽度/24+"px"
// var perRemPx = document.getElementsByTagName("html")[0].clientWidth / 24;
// //动态计算
// window.addEventListener("resize", function () {
// //获得屏幕的宽度   rem=屏幕宽度/24+"px"
//   perRemPx = document.getElementsByTagName("html")[0].clientWidth / 24;
//   //将得到的rem值复制给根元素的font-size
//   document.getElementsByTagName("html")[0].style.fontSize = perRemPx + "px";
// });
// //  将得到的rem值复制给根元素的font-size
// document.getElementsByTagName("html")[0].style.fontSize = perRemPx + "px";
//
